home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Sounds Terrific 1
/
Sounds Terrific CD (1994)(Weird Science)(Disc 2 of 2)[!][Amiga-PC].iso
/
modules
/
c
/
czsl.mod
(
.txt
)
< prev
Wrap
Commodore BASIC
|
1994-08-04
|
5KB
|
198 lines
10 REM*********************************
20 REM* CZPL - CZ PATCH LIBRARIAN *
30 REM* BY ALAN BLAND (MAB1 ON QLINK) *
40 REM* REQUIRES PASSPORT INTERFACE *
50 REM* USES DR.T FORMAT CZ FILES *
60 REM* THIS PROGRAM IS PUBLIC DOMAIN *
70 REM*********************************
80 REM
90 REM CHANGED TO CZSL (FOR SEQUENTIAL
95 REM INTERFACE) 9/26/86 BY J. JOHNSON
100 IFX=0THENX=1:LOAD"CZSL.ML",8,1
110 POKE55,32:POKE56,78:CLR:REM 20000
120 DIMDT(8),FL$(8)
130 X=20001
140 FORI=1TO8:DT(I)=X:X=X+2370:NEXT
150 MB=1
190 POKE53280,0:POKE53281,0
200 REM HERE WE GO
210 PRINT"[147] CZSL - CZ PATCH LIBRARIAN [159]"
220 PRINT
230 PRINT" T - TRANSMIT PATCHES TO CZ"
240 PRINT" R - RECEIVE PATCHES FROM CZ"
250 PRINT" G - GET SINGLE PATCH FROM CZ"
260 PRINT" P - PUT SINGLE PATCH TO CZ"
270 PRINT
280 PRINT" D - DISK DIRECTORY"
290 PRINT" L - LOAD PATCH FILE FROM DISK"
300 PRINT" S - SAVE PATCH FILE TO DISK"
310 PRINT
320 PRINT" W - SWAP TWO PATCHES"
330 PRINT" E - EDIT PATCH NAMES"
340 PRINT" X - EXIT TO BASIC"
350 PRINT
360 PRINT"[158][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]"
370 FORI=1TO8:PRINT" "CHR$(64+I),FL$(I):NEXT
380 PRINT"[158][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]";
400 GETA$:IFA$=""THEN400
410 IFA$="T"THEN1000
420 IFA$="R"THEN2000
430 IFA$="G"THEN3000
440 IFA$="P"THEN4000
450 IFA$="D"THEN5000
460 IFA$="L"THEN5500
470 IFA$="S"THEN6000
475 IFA$="W"THEN8000
480 IFA$="E"THEN7000
490 IFA$="X"THENPRINT"[147]":END
500 GOTO400
550 REM SELECT MEMORY BANK
560 PRINT"COMPUTER BANK (A-H)? ";
570 GETB$:IFB$="X"THENRETURN
580 IFB$<"A"ORB$>"H"THEN570
590 PRINTB$:MB=ASC(B$)-64
595 RETURN
600 REM SELECT CZ BANK
610 PRINT"CZ INTERNAL OR CARTRIDGE (I OR C) ";
620 GETB$:IFB$<>"I"ANDB$<>"C"ANDB$<>"X"THEN620
630 PRINTB$
640 PB=32:IFB$="C"THENPB=64
650 RETURN
700 REM SELECT PATCH NUMBER
710 INPUT"CZ PATCH NUMBER (1-16)";P$
720 P=VAL(P$):RETURN
800 REM SELECT MEMORY NUMBER
810 INPUT"COMPUTER PATCH NUMBER (1-16)";P$
820 M=VAL(P$):RETURN
900 REM INPUT FILE NAME
910 PRINT"FILE NAME? "FL$(MB)
920 PRINT"[145]FILE NAME";:INPUTF$
930 RETURN
950 REM CHECK DISK ERROR
960 INPUT#15,E,E$,T,S
970 IFE=0THENRETURN
980 PRINTE;E$;T;S
985 CLOSE2:CLOSE15
990 PRINT"PRESS ANY KEY TO CONTINUE"
991 GETA$:IFA$=""THEN991
992 RETURN
1000 PRINT"[147]TRANSMIT PATCHES TO CZ[150]"
1005 GOSUB550:IFB$="X"THEN200
1010 GOSUB600:IFB$="X"THEN200
1020 FORP=1TO16
1030 PRINTP:PRINT"[145]";
1040 PN=PB+P-1
1050 A=DT(MB)+2+(P-1)*148
1060 AH=INT(A/256):AL=A-AH*256
1070 POKE780,PN:POKE781,AL:POKE782,AH:SYS49155
1080 NEXTP
1090 GOTO200
2000 PRINT"[147]RECEIVE PATCHES FROM CZ[153]"
2005 GOSUB600:IFB$="X"THEN200
2010 GOSUB550:IFB$="X"THEN200
2020 FORP=1TO16
2030 PRINTP:PRINT"[145]";
2040 PN=PB+P-1
2050 A=DT(MB)+2+(P-1)*148
2060 AH=INT(A/256):AL=A-AH*256
2070 POKE780,PN:POKE781,AL:POKE782,AH:SYS49152
2080 NEXTP
2090 GOTO200
3000 PRINT"[147]GET SINGLE PATCH FROM CZ[153]"
3010 GOSUB600:IFB$="X"THEN200
3011 GOSUB700:IFP=0THEN200
3015 GOSUB550:IFB$="X"THEN200
3020 GOSUB800:IFM=0THEN200
3030 PN=PB+P-1
3040 A=DT(MB)+2+(M-1)*148
3050 AH=INT(A/256):AL=A-AH*256
3060 POKE780,PN:POKE781,AL:POKE782,AH:SYS49152
3320 GOTO200
4000 PRINT"[147]PUT SINGLE PATCH TO CZ[150]"
4005 GOSUB550:IFB$="X"THEN200
4010 GOSUB800:IFM=0THEN200
4015 GOSUB600:IFB$="X"THEN200
4020 GOSUB700:IFP=0THEN200
4030 PN=PB+P-1
4040 A=DT(MB)+2+(M-1)*148
4050 AH=INT(A/256):AL=A-AH*256
4060 POKE780,PN:POKE781,AL:POKE782,AH:SYS49155
4320 GOTO200
5000 REM DISK DIRECTORY
5010 PRINT"[147][159]";
5015 OPEN15,8,15,"I0"
5020 OPEN2,8,0,"$0:CZ.*"
5030 GOSUB950:IFE<>0THEN200
5040 GET#2,A$,A$
5050 GET#2,A$,B$,C$,D$
5060 C=0:IFC$<>""THENC=ASC(C$)
5070 IFD$<>""THENC=C+ASC(D$)*256
5080 GET#2,A$:IFST<>0THEN5200
5090 PRINTC;A$;
5100 GET#2,A$:IFA$<>""THENPRINTA$;:GOTO5100
5110 PRINT:GOTO5050
5200 CLOSE2:CLOSE15
5210 PRINT"PRESS ANY KEY";
5220 GETA$:IFA$=""THEN5220
5230 GOTO200
5500 PRINT"[147]LOAD FILE[159]"
5505 GOSUB550:IFB$="X"THEN200
5510 GOSUB900:IFF$="X"THEN200
5520 FL$(MB)=F$:F$="CZ."+F$+",S,R"
5530 OPEN15,8,15,"I0"
5540 OPEN2,8,2,F$
5550 GOSUB950:IFE<>0THEN200
5600 H=INT(DT(MB)/256):L=DT(MB)-H*256
5610 POKE781,L:POKE782,H:SYS49158
5611 GET#2,A$:REM SECRET TRICK
5620 CLOSE2:CLOSE15
5710 GOTO200
6000 PRINT"[147]SAVE FILE[152]"
6005 GOSUB550:IFB$="X"THEN200
6010 GOSUB900:IFF$="X"THEN200
6020 FL$(MB)=F$:F$="CZ."+F$+",S,W"
6030 OPEN15,8,15,"I0"
6040 OPEN2,8,2,F$
6050 GOSUB950:IFE<>0THEN200
6060 POKEDT,64:POKEDT+1,9:REM LENGTH
6100 H=INT(DT(MB)/256):L=DT(MB)-H*256
6110 POKE781,L:POKE782,H:SYS49161
6115 PRINT#2,"";:REM SECRET TRICK
6120 CLOSE2:CLOSE15
6210 GOTO200
7000 PRINT"[147]EDIT PATCH NAMES"
7005 GOSUB550:IFB$="X"THEN200
7010 PRINT"[147]BANK "CHR$(64+MB),FL$(MB)""
7015 PRINT
7020 FORP=1TO16
7030 A=DT(MB)+2+(P-1)*148+128
7040 PRINT" "P,
7050 FORJ=0TO19:PRINTCHR$(PEEK(A+J));:NEXT:PRINT
7060 NEXT
7070 PRINT
7080 INPUT"PATCH NUMBER OR X";P$
7085 IFP$="X"THEN200
7090 P=VAL(P$):IFP<1ORP>16THEN7000
7100 INPUT"NEW PATCH NAME";N$
7110 N$=N$+" "
7120 A=DT(MB)+2+(P-1)*148+128
7130 FORI=1TO20:POKEA+I-1,ASC(MID$(N$,I,1)):NEXT
7140 GOTO7010
8000 PRINT"[147]SWAP TWO PATCHES[158]"
8010 PRINT:PRINT"FIRST PATCH"
8015 GOSUB550:IFB$="X"THEN200
8016 B1=MB
8020 GOSUB800:IFM=0THEN200
8030 M1=M
8040 PRINT:PRINT"SECOND PATCH"
8045 GOSUB550:IFB$="X"THEN200
8046 B2=MB
8050 GOSUB800:IFM=0THEN200
8060 M2=M
8070 A1=DT(B1)+2+(M1-1)*148
8080 A2=DT(B2)+2+(M2-1)*148
8090 FORI=1TO148
8100 X=PEEK(A1):POKEA1,PEEK(A2):POKEA2,X
8110 A1=A1+1:A2=A2+1:NEXT
8120 GOTO200